import request from '@/utils/request';

// 活动列表
export const getActivityList = (params) => {
  return request({
    url: '/activity/list',
    method: 'get',
    params: params,
  });
};

// 保存活动
export const addActivity = (data) => {
  return request({
    url: '/activity/add',
    method: 'post',
    data,
  });
};

// 修改活动
export const editActivity = (data) => {
  return request({
    url: '/activity/edit',
    method: 'put',
    data,
  });
};

// 活动列表
export const getActivityOptionList = (params) => {
  return request({
    url: '/activity/option/list',
    method: 'get',
    params: params,
  });
};

// 保存活动表单选项
export const addActivityOption = (data) => {
  return request({
    url: '/activity/option/add',
    method: 'post',
    data,
  });
};

// 修改活动表单选项
export const editActivityOption = (data) => {
  return request({
    url: '/activity/option/edit',
    method: 'put',
    data,
  });
};

// 活动表单记录列表
export const getActivityRecordList = (params) => {
  return request({
    url: '/activity/record/list',
    method: 'get',
    params: params,
  });
};

// 保存活动表单记录
export const addActivityRecord = (data) => {
  return request({
    url: '/activity/record/add',
    method: 'post',
    data,
  });
};
